package no.ntnu.fp.handlers;

import no.ntnu.fp.handler.Handler;
import no.ntnu.fp.messages.Message;
import no.ntnu.fp.messages.impl.MeetingRoomsFetchedMessage;
import no.ntnu.fp.model.DialogModel;

public class MeetingRoomsFetchedHandler implements Handler {
	private final DialogModel dialogModel;
	
	public MeetingRoomsFetchedHandler(DialogModel dialogModel) {
		this.dialogModel = dialogModel;
	}

	@Override
	public void handleMessage(Message message) {
		MeetingRoomsFetchedMessage meetingRoomsFetchedMessage =
										(MeetingRoomsFetchedMessage) message;
		
		dialogModel.setRoomSchedule(meetingRoomsFetchedMessage.getSchedule());
	}

}
